/**
 * 功能描述
 */
define(function (require, exports, module) {
    //引入视图基类
    var ELView = require("elview");

    //assets
    var template = require("./assets/tpl/receivepayorg_main.tpl");
    require("./assets/css/receivepayorg_main.css");

    //business

    //component
    var rpoSubnavComp = require("./component/rpoSubnavComp");
    var rpoGridComp = require("./component/rpoGridComp");
    var rpoFormComp = require("./component/rpoFormComp");

    //constant

    //handler

    //store

    var App = ELView.extend({
        attrs: {
            template: template
        },
        initComponent: function (params, widget) {
        	rpoSubnavComp.initComponent(params,widget);
        	rpoGridComp.initComponent(params,widget);
        	rpoFormComp.initComponent(params,widget);

        },
        afterInitComponent: function (params, widget) {
        	
//        	var subnav=widget.get("subnav");
//        	var rangeDate = subnav.getValue("startDate");
//        	
//        	widget.get("subnav").load("servicepoint",{
//                params : {
//					fetchProperties:"pkServicePoint,name"
//				},
//                callback : function(data){
//                	widget.get("grid").refresh({
//                		"payer":subnav.getValue("servicepoint"),
//    					"startDate":rangeDate.start,
//    	            	"endDate":rangeDate.end,
//    	            	fetchProperties:"pkOrganizationSettlement,paymentType.*,contant,payer.ServicePoint.pkServicePoint," +
//            			"payer.ServicePoint.name,operator.CommonUser.User.pkUser,operator.CommonUser.User.name," +
//            			"payee.ServicePoint.pkServicePo,payee.ServicePoint.name,expectedAmount,expectedDate,version" 
//                	});
//              }
//            });
        }   
    });
    module.exports = App;
});
